from pathlib import Path

__all__ = ['SEARCH_ARTICLE_TEXT', 'db_file_path', 'graph_image', 'MCP_SERVER_PATH', 'ai_write_file', 'model_download']

## 检索资源 - txt 文本
SEARCH_ARTICLE_TEXT = Path(Path(__file__).parent.parent, "asset/article.txt",)

## ChromaDB - 向量数据库保存文件
def db_file_path(filename: str):
    paths = Path(Path(__file__).parent.parent, f"asset/db/{filename}")
    paths.mkdir(parents=True, exist_ok=True)
    return paths

## graph 流程图片
def graph_image(filename: str):
    paths = Path(Path(__file__).parent.parent, f"asset/flow/{filename}")
    paths.parent.mkdir(parents=True, exist_ok=True)
    return paths

## ai 自动创建的文件
def ai_write_file(filename: str):
    paths = Path(Path(__file__).parent.parent, f"asset/ai/{filename}")
    paths.parent.mkdir(parents=True, exist_ok=True)
    return paths

## MCP api 服务端
MCP_SERVER_PATH = Path(Path(__file__).parent.parent, "project/Mcp/McpServer.py")

# AI 模型保存的路径
def model_download(model_name: str):
    paths = Path(Path(__file__).parent.parent.parent, f"model/{model_name}")
    paths.parent.mkdir(parents=True, exist_ok=True)
    return paths
